/*
 * @Author: szx
 * @Date: 2022-05-20 13:33:33
 * @LastEditTime: 2022-05-20 13:36:39
 * @Description:
 * @FilePath: \leetcode\面试题\05\01.js
 */
/**
 * @param {number} N
 * @param {number} M
 * @param {number} i
 * @param {number} j
 * @return {number}
 */
var insertBits = function (N, M, i, j) {
    for (let m = i; m <= j; m++) {
        N &= ~(1 << m);
    }
    return N + (M << i);
};
